<template>
	<view class="content">
		<!-- <view>
			<image :src="img"></image>
			</view>
		详情页
		<view>
			<button @click="tapHandle">点我</button>
		</view> -->
		<view class="title">{{title}}...</view>
		<view class="art-content">
			<rich-text :nodes="strings"></rich-text>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				// img: "https://ts1.cn.mm.bing.net/th/id/R-C.2b9c9ee5d01f787e7e65e238ecf892f1?rik=O8%2fuypE2BSoGcg&riu=http%3a%2f%2fwww.bestwebsiteinindia.com%2fblog%2fwp-content%2fuploads%2f2018%2f01%2fRhesus-Macaque.jpg&ehk=KZlAkHizCG6wy1M2bhTJ9oqSDBUC58HeSJWTy%2bRfO9I%3d&risl=&pid=ImgRaw&r=0"
				title:'',
				strings:''
			}
		},
		onLoad:function(e){
			console.log(e.newsid);
			uni.request({
				url:'https://unidemo.dcloud.net.cn/api/news/36kr/'+e.newsid,
				method:'GET',
				data:{},
				success: res => {
					console.log(res);
					this.title=res.data.title;
					this.strings=res.data.content;
				},
				fail:() =>{},
				complete:() =>{}
			});
		}
		}
</script>

<style>
.content{
	padding: 10upx 2%;
	width: 96%;
	flex-wrap: wrap;
}
.title{
	line-height: 2em;
	font-weight: 700;
	font-size: 38upx;
}
.art-content{
	line-height: 2em;
}
</style>